﻿using TK.Config;

namespace TK.Character
{
    /// <summary>
    /// 将领类
    /// </summary>
    public class Hero : Unit
    {
        /// <summary>
        /// 所在城市ID
        /// </summary>
        public int LocationSettlementID { get; set; }

        #region 体力
        /// <summary>
        /// 基本体力
        /// </summary>
        public int BaseStamina { get; set; }

        /// <summary>
        /// 额外体力
        /// </summary>
        public int ModifyStamina { get; set; }

        /// <summary>
        /// 总体力
        /// </summary>
        public int Stamina => BaseStamina + ModifyStamina;

        /// <summary>
        /// 新的将领的生命上限计算方式
        /// </summary>
        public new float HPLimit => BaseHPLimit + Stamina * HeroConfig.StaminaToLife + ModifyHPLimit;

        #endregion

        #region 力量
        /// <summary>
        /// 基础力量
        /// </summary>
        public int BaseStrength { get; set; }
        
        /// <summary>
        /// 额外力量
        /// </summary>
        public int ModifyStrength { get; set; }

        /// <summary>
        /// 总力量
        /// </summary>
        public int Strength => BaseStrength + ModifyStrength;

        /// <summary>
        /// 将领的攻击力计算
        /// </summary>
        public new float Damage => BaseDamage + ModifyDamage + Strength * HeroConfig.StrengthToDamage;
        #endregion

        #region 敏捷

        /// <summary>
        /// 基础敏捷
        /// </summary>
        public int BaseAgility { get; set; }
        /// <summary>
        /// 额外敏捷
        /// </summary>
        public int ModifyAgility { get; set; }
        /// <summary>
        /// 总敏捷
        /// </summary>
        public int Agility => BaseAgility + ModifyAgility;

        #endregion

        #region 智力
        /// <summary>
        /// 基础智力
        /// </summary>
        public int BaseIntelligence { get; set; }

        /// <summary>
        /// 额外智力
        /// </summary>
        public int ModifyIntelligence { get; set; }

        /// <summary>
        /// 总智力
        /// </summary>
        public int Intelligence => BaseIntelligence + ModifyIntelligence;

        #endregion

        #region 统率
        /// <summary>
        /// 基础统率
        /// </summary>
        public int BaseLeaderShip { get; set; }

        /// <summary>
        /// 额外统率
        /// </summary>
        public int ModifyLeaderShip { get; set; }

        /// <summary>
        /// 总统率
        /// </summary>
        public int LeaderShip => BaseLeaderShip + ModifyLeaderShip;

        #endregion

        #region 意志

        /// <summary>
        /// 基础意志
        /// </summary>
        public int BaseVolition { get; set; }
        /// <summary>
        /// 额外意志
        /// </summary>
        public int ModifyVolition { get; set; }

        /// <summary>
        /// 总意志
        /// </summary>
        public int Volition => BaseVolition + ModifyVolition;

        #endregion

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 人物传记
        /// </summary>
        public string Legend { get; set; }

        /// <summary>
        /// 头像路径
        /// </summary>
        public string HeadImagePath { get; set; }

        /// <summary>
        /// 等级
        /// </summary>
        public int Level { get; set; }

        /// <summary>
        /// 当前经验
        /// </summary>
        public int currentExp { get; set; }

        /// <summary>
        /// 最大经验
        /// </summary>
        public int ExpMax { get; set; }

        /// <summary>
        /// 忠诚度
        /// </summary>
        public int Loyalty { get; set; }
    }
}

